package com.yuexun.dhdoctor.util;

import java.util.List;

/**
 * Created by wangt on 2017/7/18.
 */

public class ListChangeUtil {

    //list转化为string
    public static String listToString(List<String> stringList, String sep) {
        if (stringList == null) {
            return null;
        }
        StringBuilder result = new StringBuilder();
        boolean flag = false;
        for (String string : stringList) {
            if (flag) {
                result.append(sep == null ? "" : sep);
            } else {
                flag = true;
            }
            result.append(string);
        }
        return result.toString();
    }
}
